<template>
	<view class="global-alert" >
		<view class="topBg">
			<view style="color: #333;margin-top: 320rpx;text-align: center;">
				<view style="font-size: 40rpx;font-weight: 800;">您还未登录</view>
				<view style="font-size: 28rpx;font-weight: 700;margin-top: 24rpx;">登录可体验全部功能</view>
			</view>
			<view class="btn" @click="notLogin">现在登录</view>
			<view style="color: #FF6C34;font-size: 30rpx;"  @click.stop="closePopUp()">先用看看</view>
		</view>
		<image src="../../static/popup/quit.png" mode="" class="quitImg" @click.stop="closePopUp()"></image>
	</view>
</template>

<script>
	export default {
		props:{
			success: {
			  type: Function,
			  default: undefined
			}, // 确定的回调
			cancel: {
			  type: Function,
			  default: undefined
			}, // 取消的回调
		},
	  data() {
	    return {
	      show: true,
	    }
	  },
	  methods: {
		  // 去登录
		notLogin(){
			uni.navigateTo({
				url:'/pages/user/login/login-password/index'
			})
			this.$closePopUp() // 关闭弹窗
		},
	    closePopUp(flag) {
			console.log('1565');
	          this.$closePopUp() // 关闭弹窗
	          // if (flag === 1 && this.success) {
	          //   this.success()
	          // } else if (flag === 0 && this.cancel) {
	          //   this.cancel()
	          // }
	        }
	    
	  }
	}
</script>

<style lang="scss">
	.global-alert{
		width: 100%;
		height: 100vh;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		position: absolute;
		top: 0;
		left: 0;
		background-color: rgba(0, 0, 0, 0.4);
		z-index: 999;
	}
	.topBg{
		width: 626rpx;
		height: 687rpx;
		display: flex;
		align-items: center;
		flex-direction: column;
		background: url('../../static/popup/bg.png') no-repeat;
		background-size: 100%;
	}
	.quitImg{
		width: 68rpx;
		height: 68rpx;
		margin-top: 75rpx;
	}
	.btn{
		width: 532rpx;
		height: 82rpx;
		color: #fff;
		font-size: 30rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		background: #FF6C34;
		margin: 48rpx 0 24rpx 0;
		border-radius: 41rpx;
	}
</style>